//
//  LJM_RANK_MAIN_TableViewCell.m
//  wind
//
//  Created by 李金明 on 16/1/19.
//  Copyright © 2016年 李金明. All rights reserved.
//

#import "LJM_RANK_MAIN_TableViewCell.h"
#define BOUND 5
@implementation LJM_RANK_MAIN_TableViewCell
- (void)dealloc
{
    [_imageV release];
    [_titleLab release];
    [_firstLab release];
    [_secondLab release];
    [_threeLab release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatView];
    }

    return self;
}
- (void)creatView
{
    self.backgroundColor = [UIColor clearColor];

    self.imageV = [[UIImageView alloc] init];
    self.imageV.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.imageV];
    [_imageV release];
    self.titleLab = [[UILabel alloc] init];
    self.titleLab.textColor = [UIColor grayColor];
    self.titleLab.backgroundColor = [UIColor whiteColor];
    self.titleLab.font = [UIFont systemFontOfSize:16];
    [self.contentView addSubview:self.titleLab];
    [_titleLab release];
    
    self.firstLab = [[UILabel alloc] init];
    self.firstLab.textColor = [UIColor grayColor];
    self.firstLab.backgroundColor = [UIColor whiteColor];
    self.firstLab.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.firstLab];
    [_firstLab release];
    self.secondLab = [[UILabel alloc] init];
    self.secondLab.textColor = [UIColor grayColor];
    self.secondLab.backgroundColor = [UIColor whiteColor];
    self.secondLab.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.secondLab];
    [_secondLab release];
    self.threeLab = [[UILabel alloc] init];
    self.threeLab.textColor = [UIColor grayColor];
    self.threeLab.backgroundColor = [UIColor whiteColor];
    self.threeLab.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.threeLab];
    [_threeLab release];
    
    
}
- (void)layoutSubviews
{
[self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
    make.left.equalTo(self.mas_left).offset(BOUND);
    make.top.equalTo(self.mas_top).offset(BOUND);
    make.bottom.equalTo(self.mas_bottom).offset(-BOUND);
    make.width.mas_equalTo(@110);
}];
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.imageV.mas_right).offset(BOUND + BOUND);
        make.top.equalTo(self.mas_left).offset(BOUND);
        make.right.equalTo(self.mas_right).offset(-BOUND);
        make.height.mas_equalTo(@30);
    }];

    [self.firstLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.imageV.mas_right).offset(BOUND + BOUND);
        make.top.equalTo(self.titleLab.mas_bottom).offset(BOUND + BOUND);
        make.right.equalTo(self.mas_right).offset(-BOUND);
        make.height.mas_equalTo(@20);
    }];
    [self.secondLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.imageV.mas_right).offset(BOUND + BOUND);
        make.top.equalTo(self.firstLab.mas_bottom).offset(BOUND);
        make.right.equalTo(self.mas_right).offset(-BOUND);
        make.height.mas_equalTo(@20);
    }];
    [self.threeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.imageV.mas_right).offset(BOUND + BOUND);
        make.top.equalTo(self.secondLab.mas_bottom).offset(BOUND);
        make.right.equalTo(self.mas_right).offset(-BOUND);
        make.height.mas_equalTo(@20);
    }];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
